package dreamCookGame.conveyorBeltMiniGame;

import java.awt.image.BufferedImage;
import dreamCookGame.References;

public class ConveyorBelt {

	BufferedImage[] _images;
	References _reference;
	int _frameIndex;
	BufferedImage _currentFrame;
	
	public ConveyorBelt(References reference) {
		_reference = reference;
		_images = _reference.getImageArray("conveyorBelt");
		_frameIndex = 0;
		_currentFrame = _images[0];
	}
	
	public void setToNextFrame() {
		if(_frameIndex + 1 == _images.length)
			_frameIndex = 0;
		else
			_frameIndex++;
		
		_currentFrame = _images[_frameIndex];		
	}

}
